<script setup>
import { ref } from 'vue'
import { Search } from '@element-plus/icons-vue'

const inputValue = ref('')
const serach = () => {
  console.log(inputValue.value)
}
</script>

<template>
  <div class="header">
    <div>
      <el-button type="primary" round>新建</el-button>
    </div>
    <el-input
      v-model="inputValue"
      :suffix-icon="Search"
      class="input-header"
      placeholder="搜索"
      @keyup.enter="serach"
    />
  </div>
</template>

<style lang="scss" scoped>
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.25rem;
  height: 3.75rem;
  border-bottom: 1px solid #e2e2e2;

  .input-header {
    width: 200px;

    :deep(.el-input__wrapper) {
      border-radius: 50px;
    }
  }
}
</style>
